<template>
<div id='dataSider'>
<Sider style= "position: fixed;width: 110px;min-width: 110px;max-width: 110px; height:100%;left: 90px;overflow:auto;">
	<Menu theme="light" active-name="1" style="width: 110px;height: 100%;">
		<MenuGroup title="商品管理" class='item-title'>
		<MenuItem name="1" @click.native="routeURl()">
			<span >数据概况</span>  
		</MenuItem>
		<MenuItem name="2" @click.native="routeURl()">
		<span >数据报表</span>   
		</MenuItem>
		<MenuItem name="3" @click.native="routeURl()">
			<span>商品分析</span>                        
		</MenuItem>
		<MenuItem name="4">
			<span>交易分析</span>                    
		</MenuItem>
		<MenuItem name="5" @click.native="routeURl()">
			<span>客户分析</span>                        
		</MenuItem>
		<MenuItem name="6" @click.native="routeURl()">
			<span>页面分析</span>                    
		</MenuItem>
		<MenuItem name="7" @click.native="routeURl()">
			<span>来源监控</span>                    
		</MenuItem>
		</MenuGroup>
		<MenuGroup title="配置" class='item-title'>
		<MenuItem name="8" @click.native="routeURl()">
				<span>销售目标</span>                 
		</MenuItem>
		
		</MenuGroup>
	</Menu>
</Sider> 
 <router-view></router-view>
</div>
</template>

<script>
export default{
	data(){
	    return{
			
		}
	},
	mounted(){
           this.menuList()
	 },
	methods:{
		routeURl(url){
		this.$router.push({ path: url })
		},
		menuList(){  
		let path = this.$route.path  
		if(path.indexOf('/data/dataGeneralsituation') != -1){  
			this.activeMenu = '1'
			return this.activeMenu
		}
		if(path.indexOf('/goods/chuku') != -1){
			this.activeMenu = '2'
			return this.activeMenu
		}
		if(path.indexOf('/storesGoods') != -1){
			this.activeMenu = '3'
			return this.activeMenu
		}
		if(path.indexOf('/onlineStore') != -1){
			this.activeMenu = '4'
			return this.activeMenu
				}
				if(path.indexOf('/inventoryQuery') != -1){
			this.activeMenu = '5'
			return this.activeMenu
				}
				if(path.indexOf('/procurementOrder') != -1){
			this.activeMenu = '6'
			return this.activeMenu
				}
				if(path.indexOf('/goodsInlib') != -1){
			this.activeMenu = '7'
			return this.activeMenu
				}
				if(path.indexOf('/goodsOutlib') != -1){
			this.activeMenu = '8'
			return this.activeMenu
		}
              
         }
	},
}
</script>

<style>
</style>